Overly Complex Phone Number Validator - Minimalist Edition
This is an example of an overly complex phone number validator, because, you know, simplicity is so last season.
Phone numbers are validated for the following criteria:
- Must be exactly 10 digits long
- Must start with a 1
- Must contain at least 3 numbers
- Must be in the format XXX-XXX-XXXX
- Must contain no more than 2 consecutive repeating digits
- Must not be the number 1234567890, that's just not allowed
Example valid phone numbers:
(123) 456-7890
(1) 234-5679-0
1234 56 7 8902
Go to the Maximalist Edition for more validation rules
Or, if you're feeling adventurous, try the Paranoid Edition for an extra layer of paranoia in your phone number validation